//
//  JKLoginRegisterViewController.swift
//  afanti
//
//  Created by albert on 16/4/16.
//  Copyright © 2016年 albert. All rights reserved.
//

import UIKit

class JKLoginRegisterViewController: UIViewController {

    @IBOutlet weak var registerBtn: UIButton!
    
    @IBAction func registerBtnClick() {
        
    }
    
    
    @IBOutlet weak var loginBtn: UIButton!
    
    @IBAction func loginBtnClick() {
        
    }
    
    init() {
        super.init(nibName: "JKLoginRegisterViewController", bundle: nil)
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    
    override func viewDidLoad() {
        super.viewDidLoad()

        addBackBtn()
    }
    
    /** 添加返回按钮 */
    func addBackBtn(){
        let btn = UIButton(type: UIButtonType.Custom)
        btn.frame = CGRect(x: 20, y: 35, width: 25, height: 25)
        btn.setBackgroundImage(UIImage(named: "AFTBack"), forState: UIControlState.Normal)
        btn.adjustsImageWhenDisabled = false
        
        btn.addTarget(self, action: "back", forControlEvents: UIControlEvents.TouchUpInside)
        
        view.addSubview(btn)
    }
    
    override func viewWillAppear(animated: Bool) {
        super.viewWillAppear(animated)
        
        self.navigationController?.navigationBar.hidden = true
    }

    /** 返回 */
    func back(){
        self.navigationController?.popViewControllerAnimated(true)
    }

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
